﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using SdlDotNet.Graphics;
using SdlDotNet.Core;
using System.Drawing;
using System.Runtime.InteropServices;
using VLanControl;
using Lizk.Utilities;
using System.IO;
using System.Reflection;
using SDLHUDEngine;
using System.Threading;

namespace SharpMedia
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main2()
        {
            NewLibVlc.libvlc_exception_t ex = new NewLibVlc.libvlc_exception_t();
            ex.Init();
            NewLibVlc vlc = new NewLibVlc();
            

            return;
            if (SystemTools.ProcessAlreadyRunning())
                return;

            

            SharpMedia.RootDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
            if (!Directory.Exists(SharpMedia.RootDirectory))
                Directory.CreateDirectory(SharpMedia.RootDirectory);



            SharpMedia.LoadSettings(Path.Combine(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "felizk"), "SharpMedia"));

            SharpMedia.renderer = new SDLHUDEngine.Renderer()
            {
                ImageRoot = Path.Combine(SharpMedia.RootDirectory, "images"),
                FontRootDir = Path.Combine(SharpMedia.RootDirectory, @"images\fonts"),
                GarbageCollectionInterval = new TimeSpan(0, 4, 30)
            };


            SDLEngine engine = new SDLEngine((Renderer)SharpMedia.renderer);
            engine.Initialize();

            SharpMedia.Init(Thread.CurrentThread);
            
            engine.Run();

        }

    }
}
